package com.yoso.springcloud.service;

import com.yoso.springcloud.domain.CommonResult;
import com.yoso.springcloud.domain.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Description:
 * @Date: 2021/10/14 10:51
 */
@Service
@FeignClient("CLOUD-PAYMENT-SERVICE") //指定远程调用微服务的名称
public interface PaymentFeignService {
    @PostMapping("/payment/save")
    CommonResult<Payment> save(Payment payment);
    @GetMapping("/payment/get/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);
}
